package cc.ucanuup.service.base.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cc.ucanuup.service.base.dao.RelationRoleResourceJPA;
import cc.ucanuup.service.base.entity.RelationRoleResource;
import cc.ucanuup.service.base.inter.RoleResourceService;


/**
 * Description: TODO[描述该类概要功能介绍]
 *
 * @author guwenbin
 * @date 2018年2月6日
 * @version 1.0
 */
@Service
public class RoleResourceServiceImpl implements RoleResourceService {

	@Autowired
	private RelationRoleResourceJPA relationRoleResourceJPA;

	@Override
	public void delete(RelationRoleResource entity) {
		relationRoleResourceJPA.delete(entity);

	}

	@Override
	public RelationRoleResource findOneByRoleIdAndResId(String roleId, String resId) {

		return relationRoleResourceJPA.findOneByRoleIdAndResId( roleId, resId);
	}

	@Override
	public RelationRoleResource save(RelationRoleResource entity) {

		return relationRoleResourceJPA.save(entity);
	}

}
